<template>
    <f7-page>
        <f7-navbar title="登录" back-link="返回" sliding ></f7-navbar>
        <div class="content-block-title" ></div>
        <div class="list-block" >
            <ul>
                <li>
                    <div class="item-content" >
                        <div class="item-media"><i class="icon icon-form-email"></i></div>
                        <div class="item-inner">
                            <div class="item-input">
                                <input type="number" placeholder="请输入手机号" v-model="phoneNumber">
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <div class="content-block">
            <a class="button button-big button-fill" @click="registerWithTelephone()">下一步</a>
        </div>
    </f7-page>
</template>
<script>
    import api from '../../../src/common/index'
    export default{
        data(){
            return {
                phoneNumber:''
            }
        },
        methods: {
            registerWithTelephone() {
//                this.$router.load({url:'/login/code/' + this.phoneNumber});
                let childThis = this;
                let params = {"Phoneno":this.phoneNumber};
                api.sms.post(params,function (response) {
                    childThis.$router.load({url:'/login/code/' + childThis.phoneNumber});
                })
            }
        }
    }
</script>

